package Underworld_Survival;

import java.io.Serializable;
import java.util.List;

//游戏道具基类，用于被继承
abstract class Item implements Serializable {
    protected transient String name;//道具名称
    protected transient String introduction;//道具介绍
    protected transient String itemEffect;//道具效果
    protected transient CurrencyType purchaseCurrency;//购买的货币类型
    protected transient int priceOfPurchase;//道具购入价格
    protected transient int priceOfSelling;//道具出售价格
    private static final long serialVersionUID = 1L;
    public abstract String getItemId();

    public Item() {}
    public Item(String name, String introduction, String itemEffect, CurrencyType purchaseCurrency,
                int priceOfPurchase, int priceOfSelling) {
        this.name = name;
        this.introduction = introduction;
        this.itemEffect = itemEffect;
        this.purchaseCurrency = purchaseCurrency;
        this.priceOfPurchase = priceOfPurchase;
        this.priceOfSelling = priceOfSelling;
    }

    public void showItem(){
        System.out.println(name+":\n介绍："+introduction+"\n效果："+itemEffect);
    }


    public String getName() {return name;}
    public void setName(String name) {this.name = name;}
    public String getIntroduction() {return introduction;}
    public void setIntroduction(String introduction) {this.introduction = introduction;}
    public String getItemEffect() {return itemEffect;}
    public void setItemEffect(String itemEffect) {this.itemEffect = itemEffect;}
    public CurrencyType getPurchaseCurrency() {return purchaseCurrency;}
    public void setPurchaseCurrency(CurrencyType purchaseCurrency) {this.purchaseCurrency = purchaseCurrency;}
    public int getPriceOfPurchase() {return priceOfPurchase;}
    public void setPriceOfPurchase(int priceOfPurchase) {this.priceOfPurchase = priceOfPurchase;}
    public int getPriceOfSelling() {return priceOfSelling;}
    public void setPriceOfSelling(int priceOfSelling) {this.priceOfSelling = priceOfSelling;}


}
